package net.java.amateras.uml.classdiagram.editpart;

import net.java.amateras.uml.classdiagram.figure.RealizationConnectionFigure;
import net.java.amateras.uml.classdiagram.model.RealizationModel;
import net.java.amateras.uml.editpart.AbstractUMLConnectionEditPart;

import org.eclipse.draw2d.IFigure;

import concrete.AmaterasMediator;

public class RealizationEditPart extends AbstractUMLConnectionEditPart {

	protected IFigure createFigure() {

		RealizationModel model = (RealizationModel)getModel();
		String source = model.getSource().toString();
		String target = model.getTarget().toString();
		
		AmaterasMediator.getInstance().addImplementationRel(source, target);
				
		return new RealizationConnectionFigure();
	}
	
}
